<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body,html{
            margin: 0;
            padding: 0;
        }
        img{
            margin: 20px auto;
            display: block;
        }
        h2{
            display: block;
            margin: -15px auto;
            text-align: center;
            font-family:'microsoft yahei';
            color: #494844;
            font-size: 42px;
            font-weight: 700;
        }
        h4{
            display: block;
            margin: 60px auto;
            text-align: center;
            font-family:'sans-serif';
            color: #908f87;
        }
        #Num{
            color: #91abe0;
            font-size: 18px;
        }
        button{
            color: #fff;
            background-color: #337ab7;
            border-color: #2e6da4;
            padding: 10px;
            border: 0;
            margin: 0 auto;
            cursor: pointer;
            border-radius: 3px;
        }
    </style>
</head>
<body>
<img src="../../resources/img/404.png" alt="">\
<h2>哎呀 ! 出错啦 ! </h2>
<h4><b id="Num">10</b>   秒内自动跳回首页 <button onclick="window.history.go(-1)">返回上一页</button></h4>

</body>
<script>
   window.onload=function(){
       var i = 9;
       var intervalid;
       intervalid = setInterval(fun, 1000);
       function fun() {
           if (i == 0) {
//               window.location.href = "../../index.html";//要返回的页面
               clearInterval(intervalid);
           }
           document.getElementById("Num").innerHTML = i;
           i--;
       }
   }


</script>
</html>